<?php
/**
 * Created by veema.
 * Function:
 * Date: 20/8/13
 * Time: 17:40
 */

namespace app\admin\model;
use think\Model;
use app\admin\model\DeviceSensor;

class Device extends Model
{
    protected $table = 'up__device';
    public function sensors()
    {
        return $this->hasMany('DeviceSensor')->field('sensor_id');
    }
}